<?php
ini_set('display_errors', 'on');
error_reporting(E_ALL);

header('Content-Type: text/html; charset=UTF-8');
date_default_timezone_set('PRC');

defined('YII_ENV') or define('YII_ENV', isset($_SERVER['ENV_CODE']) ? $_SERVER['ENV_CODE'] : 'dev');
defined('YII_DEBUG') or define('YII_DEBUG', YII_ENV === 'prod' ? FALSE : TRUE);

defined('APP_ROOT') or define('APP_ROOT', dirname(__DIR__));
defined('SYS_ROOT') or define('SYS_ROOT', APP_ROOT . '/system');
defined('YII_ROOT') or define('YII_ROOT', APP_ROOT . '/vendor');
define('APP_KEY', '90abbab323332b565d6d1474e33d28dc');

require(YII_ROOT . '/Yii.php');

Yii::setAlias('admin', SYS_ROOT . '/modules/admin');

Yii::setAlias('yii/gii', SYS_ROOT . '/modules/gii');
Yii::setAlias('yii/bootstrap', SYS_ROOT . '/modules/yii2-bootstrap');
Yii::setAlias('yii/authclient', SYS_ROOT . '/extensions/authclient');
Yii::setAlias('yii/httpclient', SYS_ROOT . '/extensions/httpclient');
Yii::setAlias('think', SYS_ROOT . '/extensions/think-image');
$config = require(SYS_ROOT . '/config/main.php');

$application = new yii\web\Application($config);
$application->run();
